<template>
  <div class="con">
    <v-title title="兴业电子账户">
      <p class="date">查询时间:{{$utils.toTimeFormat(date,'yyyy年MM月dd日 hh时mm分ss秒')}}
        <i class="iconfont icon-shuaxin" @click="refresh"></i>
      </p>
    </v-title>
    <div class="dfr">
      <v-private-item label="可用余额" :value="wallet.account_balance"/>
      <v-private-item label="交易中金额" :value="wallet.trade_balance"/>
      <p>
        <el-button type="primary" @click="putForward()">提现</el-button>
      </p>
    </div>
  </div>
</template>

<script lang="ts">
  import { Vue, Component, Prop } from 'vue-property-decorator'
  import vTitle from '../home-title'
  import vPrivateItem from '../private-item'

  @Component({
    components: {
      vTitle, vPrivateItem
    }
  })
  export default class Store extends Vue {
    @Prop({
      default: () => {}
    }) wallet
    @Prop({
      default: () => {}
    }) corpNo
    date = +new Date()
    refresh () {
      this.$emit('refresh')
      this.date = +new Date()
    }
    putForward () {
      // window.open(this.xingyeURL+this.corpNo)
      window.open(this.xingyeURL)
    }
  }
</script>

<style lang="less" scoped>
  .con {
    padding-bottom: 20px;

  }

  .title {
    font-size: 20px;
    color: #666;
    margin: 20px auto 40px;
    padding-left: 20px;
  }

  .date {
    color: #999;
    font-size: 14px;
  }

  .dfr {
    width: 80%;
    margin: 0 auto;
  }

  .iconfont {
    cursor: pointer;
  }
</style>
